// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   ServerMode.java

package org.quickserver.util.xmlreader;

import java.io.Serializable;

public class ServerMode
    implements Serializable
{

    public ServerMode()
    {
        blocking = true;
    }

    public boolean getBlocking()
    {
        return blocking;
    }

    public void setBlocking(boolean blocking)
    {
        this.blocking = blocking;
    }

    public String toXML(String pad)
    {
        if(pad == null)
            pad = "";
        StringBuilder sb = new StringBuilder();
        sb.append(pad).append("<server-mode>\n");
        sb.append(pad).append("\t<blocking>").append(getBlocking()).append("</blocking>\n");
        sb.append(pad).append("</server-mode>\n");
        return sb.toString();
    }

    public String toString()
    {
        if(getBlocking())
            return "Blocking";
        else
            return "Non-Blocking";
    }

    private boolean blocking;
}
